package cn.jvav.zh.database;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class JDBC{
	private static final String URL = "jdbc:mysql://localhost:3306/magic_tower";
	private static final String user = "root";
	private static final String password = "password";
	public static Connection getConnection(){
		try{
			return DriverManager.getConnection(URL, user, password);
		}catch(SQLException e){
			throw new RuntimeException("找不到MySQL JDBC驱动");
		}
	}
}